﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Fundamental.Parameterfull
{
    internal class AnonymousType
    {
        enum Gender
        {
            Female,
            Male
        }

        private string m_name;

        public void Print()
        {
            var obj = new { Name = "Frank Gao", Age = 31, Gender = Gender.Female };

            Console.WriteLine(string.Format("{0}'s age is {1} and gender is {2}", obj.Name,obj.Age,obj.Gender));
        }

        public void TestTuple()
        {
            Tuple<int, string, DateTime> tuple = new Tuple<int, string, DateTime>(0, "Frank", DateTime.Now);

            Console.WriteLine(string.Format("{0}'s name is {1} and current time is {2}", tuple.Item1, tuple.Item2, tuple.Item3));
        }


        public string Name
        {
            get { return m_name; }
            private set {m_name= value;}
        }
    }
}
